<style lang="less">

</style>
<template>
  <Table :columns="columns1" :data="data1"></Table>
</template>
<script>
import { eventorderlist } from '@/api/eventlist'
export default {
  data () {
    return {
      columns1: [
        {
          title: '事项名称',
          key: 'title'
        },
        {
          title: '业务编号',
          key: 'code'
        },
        {
          title: '姓名',
          key: 'name'
        },
        {
          title: '手机号',
          key: 'mobile'
        },
        {
          title: '身份证',
          key: 'cardno'
        },
        {
          title: '操作',
          key: 'cardno',
          render: (h, params) => {
            return h('div', [
              h('Button', {
                props: {
                  type: 'primary',
                  size: 'small'
                },
                style: {
                  marginRight: '5px'
                },
                on: {
                  click: () => {
                    this.show(params.index)
                  }
                }
              }, 'View'),
              h('Button', {
                props: {
                  type: 'error',
                  size: 'small'
                },
                on: {
                  click: () => {
                    this.remove(params.index)
                  }
                }
              }, 'Delete')
            ])
          }
        }

      ],
      data1: []
    }
  },
  methods: {

  },
  mounted () {
    eventorderlist().then(res => {
      this.data1 = res.data.data.results
      console.log(res, '调用接口返回来的数据')
      console.log(this.data1)
    })
  }
}
</script>
